<!DOCTYPE html>
<html>
    
    <head>
        <meta charset="UTF-8">
        <title>小鱼ADMIN</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="stylesheet" href="/public/static/css/font.css">
        <link rel="stylesheet" href="/public/static/css/bgadmin.css">
        <script type="text/javascript" src="/public/static/js/jquery-1.8.0.min.js"></script>
        <script type="text/javascript" src="/public/static/lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="/public/static/js/bgadmin.js"></script>
        <script type="text/javascript" src="/public/static/js/jquery.form.js"></script>  
    </head>
    
    <body>
        <div class="bg-body">
            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief" style="margin-top: -12px">
              <ul class="layui-tab-title">
                {if condition="($username eq 'admin') OR ($priv['edit'] eq 'Y')"}
                <li class="layui-this">基本资料</li>
                {/if}
                {if condition="($username eq 'admin') OR ($priv['view_detail'] eq 'Y')"}
                <li>详细资料</li>
                {/if}
                {if condition="($username eq 'admin') OR ($priv['view_extend'] eq 'Y')"}
                <li>扩展字段</li>
                {/if}
                {if condition="($username eq 'admin') OR ($priv['view_illness'] eq 'Y')"}
                <li onclick="loadIframe('iframe_illness', './illness.html?customer_id={$customerData.customer_code}')">客户病情</li>
                {/if}
                {if condition="($username eq 'admin') OR ($priv['view_visit'] eq 'Y')"}
                <li onclick="loadIframe('iframe_visit', './visit.html?customer_id={$customerData.customer_code}')">回访记录</li>
                {/if}
                {if condition="($username eq 'admin') OR ($priv['view_order'] eq 'Y')"}
                <li onclick="loadIframe('iframe_add_order', '../orderManager/addOrder.html?customer_id={$customerData.customer_code}')">添加订单</li>
                {/if}
                {if condition="($username eq 'admin') OR ($priv['view_order'] eq 'Y')"}
                <li onclick="loadIframe('iframe_order', '../orderManager/orderList.html?customer_id={$customerData.customer_code}')">历史订单</li>
                {/if}
              </ul>
              <div class="layui-tab-content" style="height: 100px;">
                {if condition="($username eq 'admin') OR ($priv['edit'] eq 'Y')"}
                <div class="layui-tab-item layui-show">
                    <form  action="#" method="post" id="basicCustomer" class="layui-form">
                        <input type="hidden" name="customer_code" value="{$customerData.customer_code}">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    客户ID：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" value="{$customerData.customer_code}" disabled class="layui-input layui-bg-gray">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    <span class="bg-red">*&nbsp;&nbsp;</span>客户姓名：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" id="name" name="name" value="{$customerData.name}" lay-verify="required" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    <span class="bg-red">*&nbsp;&nbsp;</span>电话：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" id="phone" name="phone" value="{$customerData.phone}" lay-verify="required" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    性别：
                                </label>
                                <div class="layui-input-inline">
                                    <select name="sex" id="sex" autocomplete="off" class="layui-input">
                                        <option value="">请选择</option>
                                        {$customerData.option}
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    年龄：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" id="age" name="age" value="{$customerData.age}" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    生日：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" id="brithday" name="brithday" value="{$customerData.brithday}" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    最后回访：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" id="last_call_time" name="last_call_time" value="{$customerData.last_call_time}" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    最后下单：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" id="last_order_time" name="last_order_time" value="{$customerData.last_order_time}" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">选择地址：</label>
                            <div class="layui-input-inline">
                                <select name="province" id="province" lay-skin="select" lay-filter="province">
                                    <option value="">请选择省</option>
                                </select>
                            </div>
                            <div class="layui-input-inline">
                                <select name="city" id="city" lay-skin="select" lay-filter="city">
                                    <option value="">请选择市</option>
                                </select>
                            </div>
                            <div class="layui-input-inline">
                                <select name="area" id="area" lay-skin="select" lay-filter="area">
                                    <option value="">请选择区镇</option>
                                </select>
                            </div>
                            <div class="layui-input-inline">
                                <select name="street" id="street" lay-skin="select" lay-filter="street">
                                    <option value="">请选择街道</option>
                                </select>
                            </div>
                         </div>
                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">
                                所选地址：
                            </label>
                            <div class="layui-input-block" id="address_select" style="padding-top: 11px;">
                                <span id="address_province"></span>
                                <span id="address_city"></span>
                                <span id="address_area"></span>
                                <span id="address_street"></span>
                            </div>
                        </div>
                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">
                                <span class="bg-red">*&nbsp;&nbsp;</span>默认地址：
                            </label>
                            <div class="layui-input-inline">
                                <textarea class="layui-textarea" name="address" id="address" lay-verify="required" cols="80" rows="2" style="resize:none">{$customerData.address}</textarea>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label"></label>
                                <div class="layui-input-inline">
                                    <a class="layui-btn" lay-submit="" id="saveBasicCustomer" lay-filter="saveBasicCustomer">保存</a>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                {/if}
                {if condition="($username eq 'admin') OR ($priv['view_detail'] eq 'Y')"}
                <div class="layui-tab-item">
                    <form  action="#" method="post" id="detailCustomer" class="layui-form">
                        <input type="hidden" name="customer_code" value="{$customerData.customer_code}">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    客户ID：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" value="{$customerData.customer_code}" disabled class="layui-input layui-bg-gray">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    客户姓名：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" value="{$customerData.name}" disabled class="layui-input layui-bg-gray">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    回访时间：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" id="callbacktime" name="callbacktime" disabled value="{$customerData.callbacktime}" autocomplete="off" class="layui-input layui-bg-gray">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    积分：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" id="integral" name="integral" disabled value="{$customerData.integral}" autocomplete="off" class="layui-input layui-bg-gray">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    是否下过单：
                                </label>
                                <div class="layui-input-inline">
                                    <select name="order_status" id="order_status" autocomplete="off" disabled class="layui-input layui-bg-gray">
                                        {$customerData.order_status}
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    电子邮箱：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" id="email" name="email" value="{$customerData.email}" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    QQ：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" id="qq_number" name="qq_number" value="{$customerData.qq_number}" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    邮编：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" id="zipcode" name="zipcode" value="{$customerData.zipcode}" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    昵称：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" id="nickname" name="nickname" value="{$customerData.nickname}" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            
                        </div>
                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">
                                描述：
                            </label>
                            <div class="layui-input-inline">
                                <textarea class="layui-textarea" name="description" cols="80" rows="3" style="resize:none">{$customerData.description}</textarea>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label"></label>
                                <div class="layui-input-inline">
                                    <a class="layui-btn" lay-submit="" id="saveDetailCustomer" lay-filter="saveDetailCustomer">保存</a>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                {/if}
                {if condition="($username eq 'admin') OR ($priv['view_extend'] eq 'Y')"}
                <div class="layui-tab-item">
                    <form  action="#" method="post" id="extendCustomer" class="layui-form">
                        <input type="hidden" name="customer_code" value="{$customerData.customer_code}">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    客户ID：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" value="{$customerData.customer_code}" disabled class="layui-input layui-bg-gray">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    客户姓名：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" value="{$customerData.name}" disabled class="layui-input layui-bg-gray">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    扩展字段1：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" id="extend1" name="extend1" value="{$customerData.extend1}" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    扩展字段2：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" id="extend2" name="extend2" value="{$customerData.extend2}" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    扩展字段3：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" id="extend3" name="extend3" value="{$customerData.extend3}" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    扩展字段4：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" id="extend4" name="extend4" value="{$customerData.extend4}" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    扩展字段5：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" id="extend5" name="extend5" value="{$customerData.extend5}" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    扩展字段6：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" id="extend6" name="extend6" value="{$customerData.extend6}" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">
                                    扩展字段7：
                                </label>
                                <div class="layui-input-inline">
                                    <input type="text" id="extend7" name="extend7" value="{$customerData.extend7}" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label"></label>
                                <div class="layui-input-inline">
                                    <a class="layui-btn" lay-submit="" id="saveExtendCustomer" lay-filter="saveExtendCustomer">保存</a>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                {/if}
                {if condition="($username eq 'admin') OR ($priv['view_illness'] eq 'Y')"}
                <div class="layui-tab-item">
                    <iframe id="iframe_illness" src="" style="width:100%;height:370px;" scrolling="auto" frameborder="0" ></iframe>
                    <!-- <iframe id="iframe_illness" src="./illness.html?customer_id={$customerData.id}" style="width:100%;height:370px;" scrolling="auto" frameborder="0" ></iframe> -->
                </div>
                {/if}
                {if condition="($username eq 'admin') OR ($priv['view_visit'] eq 'Y')"}
                <div class="layui-tab-item">
                    <iframe id="iframe_visit" src="" style="width:100%;height:370px;" scrolling="auto" frameborder="0" ></iframe>
                    <!-- <iframe id="iframe_visit" src="./visit.html?customer_id={$customerData.id}" style="width:100%;height:370px;" scrolling="auto" frameborder="0" ></iframe> -->
                </div>
                {/if}
                {if condition="($username eq 'admin') OR ($priv['view_order'] eq 'Y')"}
                <div class="layui-tab-item">
                    <iframe id="iframe_add_order" src="" style="width:100%;height:580px;" scrolling="auto" frameborder="0" ></iframe>
                    <!-- <iframe id="iframe_add_order" src="../orderManager/addOrder.html?customer_id={$customerData.id}" style="width:100%;height:580px;" scrolling="auto" frameborder="0" ></iframe> -->
                </div>
                {/if}
                {if condition="($username eq 'admin') OR ($priv['view_order'] eq 'Y')"}
                <div class="layui-tab-item">
                    <iframe id="iframe_order" src="" style="width:100%;height:580px;" scrolling="auto" frameborder="0" ></iframe>
                    <!-- <iframe id="iframe_order" src="../orderManager/orderList.html?customer_id={$customerData.id}" style="width:100%;height:580px;" scrolling="auto" frameborder="0" ></iframe> -->
                </div>
                {/if}
              </div>
            </div>
        </div>
    </body>
    <script type="text/javascript" src="/public/static/crm/js/customer/editCustomer.js"></script>
</html>
